RPE_light DoorsExport.inc file parameters

Have anyone know the list of parameter to set the values in the "File -> Export -> Document Generation->Export" window?

Specially i need to set the word template stylesheet(for header and footer) to generate the word document from the DXL code.

 

The window will be like in the attached picture "Export_advance.jpg" when we generate it manually from ""File -> Export -> Document Generation->Export"

For this i have a style sheet in my local drive and to set while running Document generation via the DXL Script.

 

I need to do below things from dxl code:

1.I need to call the function when click "Advanced" Button from code

2. Then have to enable the "Use Custom template" check box.

3. Have to set the "stylesheet.docx" file path to the text box variable from code itself.

 

I have searched some of the forums and found this for customizing templatefile for the export.

 

//Code

bool confirm (string s) { print "Confirmed: " s "\n"; return true }
void ack (string s) {print "Ack: " s "\n" }
void errorBox (string s) {print "Error: " s "\n"; }
void warningBox (string s) {print "Warning: " s "\n"; }
void acknowledge (string s) {print "Acknowledge: " s "\n"  }
void infobox (string s) {print "InfoBox: " s "\n" }
void info (string s) {print "Info: " s "\n" }
 
DB tmpDB = null
DBE tm = null
 
// Notice that show will only store the variable now.
void oldshow  (DB x) { show x}
void show  (DB x) { tmpDB = x }
 
{
    #include <standard/export/RPE_Light/DoorsExport.inc>
 
        // create the dialog but do not show it yet
        showRPEExportDialog(LS_("String_Export_To_PDF", NLSTEMP_("Export to PDF")), (NLS_("pdf")), (NLS_(".pdf")))
        
        // add a timer to it, it will 'press' the button now after we do show ...
        void newcb(DBE x) {
            print "Calling timercallback ...\n"           
            stopTimer tm; exportCB(null)
        }
 
        tm = timer(tmpDB, 0.2, newcb, "");
        // realize the dialog box, so we can apply the settings ....
        realize tmpDB;
        // apply the settings
       // set(exportFileName,"C:\\Users\\USERId\\Desktop\\Test4.pdf") //Throwing error as undefined variable
        set(includeEmptyAttrsToggle, true)
        set(viewNameToggle, true)
        set(includeTablesToggle, true)
        set(templateFile,"C:\\Users\\USERID\\Desktop\\sdsd.dta")
        //set(stylechoice,0)         //Throwing error as undefined variable
 
        // show the dialog, timer will kick in and press our button
        print "About to enter message loop ...\n"
        oldshow tmpDB
}

 

Please help me to figure it out.

Thank you in advance.

 


Nandy_M - Mon Mar 21 08:45:05 EDT 2016

Re: RPE_light DoorsExport.inc file parameters
O.Wilkop - Wed Mar 23 09:16:45 EDT 2016

I know it is not exactly what you are looking for, but I think the solution I can offer you is a better one:

 

If you override the system call to the dialog box you can analyze the call to RPE light:

 

void systemOld(string s){
        system(s);
}

void system(string s){
        print s"\n";
        systemOld(s);
}


#include <standard/export/RPE_Light/DoorsExport.inc>
showRPEExportDialog(LS_("String_Export_To_PDF", NLSTEMP_("Export to PDF")), (NLS_("pdf")), (NLS_(".pdf")))

 

There is exactly one call which looks basically boils down to:

 

javaw.exe 

-Dcom.ibm.rational.rpe.doors.home="[path/to/doors.exe]"
-Dcom.ibm.rational.rpe.doors.data="[something unique to your installation?]" 
-cp "[path to RPE lite]" 
-jar "[path to RPE lite.jar]" 
"C:\Users\[Username]\AppData\Local\Temp\rpe\[config].xml"

 

(I removed all the parts that are specific to my installation, you will have to run the script above once to get your specific paths)

 

If you look at that call, you will see that everything except for the .xml parameter is static. If you open that .xml file in your temp folder you can see all the options that get passed when you call the rpe lite export:

 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<parameters>
    <outputPath>C:\Users\[User]\Desktop</outputPath>
    <outputFormats>Word </outputFormats>
    <modulePath>/Testarea/New Module</modulePath>
    <view>Standard view</view>
    <moduleBaseline>Current</moduleBaseline>
    <rpeTemplatePath>[Templatepath]</rpeTemplatePath>
    <rpeHome>[RPE Lite path]</rpeHome>
    <rpeDoorsVer>Created by IBM Rational DOORS 9.6</rpeDoorsVer>
    <rpeDateTimePattern>yyyy-MM-dd HH:mm:ss</rpeDateTimePattern>
    <rpeExportDate>2016 03 23</rpeExportDate>
    <rpeIncludeEmptyAttrs>false</rpeIncludeEmptyAttrs>
    <rpeIncTables>true</rpeIncTables>
    <DOORS_preserveDOORSTableProperties>true</DOORS_preserveDOORSTableProperties>
    <rpeUseViewName>false</rpeUseViewName>
    <rpeFooter>/Testarea/New Module</rpeFooter>
    <export>true</export>
    <OleAsImage>true</OleAsImage>
    <rpeWordTemplate>D:\word.doc</rpeWordTemplate>
</parameters>

 

As you can see, all relevant parameters show up here.

 

 

So my solution would be:

1. Make a export once with the configuration you want.

2. Check the created .xml file and look at the parts concerning template/modulename/whatever you want to change

3. Write a simple script that creates the .xml file dynamically with your parameters

4. Call the static call from above with your newly created .xml file

5. Enjoy your RPE export